package constant

import "gitee.com/baizhige/go-server-tempalte/common/errs"

var (
	// 系统错误
	ErrSystem = errs.New("SYS001", "系统错误")

	//通用中间件错误
	ErrContractor   = errs.New("SYS101", "不符合约定的响应")
	ErrSignMethod   = errs.New("SYS102", "签名方式非法")
	ErrPageNotFind  = errs.New("SYS103", "can not find")
	ErrRouterEnable = errs.New("SYS104", "路由未启用")

	// 客户端相关错误
	ErrClientIdNotFind       = errs.New("SYS203", "客户端ID不存在")
	ErrClientKeyParamInvalid = errs.New("SYS204", "生成通信密钥请求参数无效")
	ErrClientTrustKeyInvalid = errs.New("SYS205", "互信密钥无效")
	ErrClientKeyIsInvalid    = errs.New("SYS206", "通信密钥无效")
	ErrClientKeyNotFind      = errs.New("SYS207", "通信密钥未找到")

	ErrRedisOperation = errs.New("SYS310", "操作Redis时失败")

	// 通用增删改查错误
	ErrInsert     = errs.New("CRUD000", "新增失败，请检查数据是否已经存在")
	ErrCopyData   = errs.New("CRUD001", "备份失败")
	ErrDeleteData = errs.New("CRUD002", "删除失败")
	ErrUpdateOne  = errs.New("CRUD003", "更新失败")
	ErrQueryPage  = errs.New("CRUD004", "查询失败")

	// 路由业务相关错误
	ErrRouterNotFind       = errs.New("ROUTER0", "路由不存在")
	ErrRouterInvalidModify = errs.New("ROUTER1", "非法修改")
)
